﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using FixtureManageSystem.Models;
using System.Runtime.CompilerServices;
using FixtureManageSystem.Commands;

namespace FixtureManageSystem.ViewModels
{

    class DataExportViewMode : INotifyPropertyChanged
    {

        // 输出路径
        private string dstfilename;
        public string Dstfilename{
            get { return dstfilename; }
            set { if (value != dstfilename) {
                    dstfilename = value;
                }
            } }
 
        // 借用服务，这里主要用到查询
        public DataExportService dataExportService;
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
        {
            if (PropertyChanged != null)
            {
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
            }
        }


        /// <summary>
        /// 数据导出命令
        /// </summary>
        private ICommand dataExportCommand;
        public ICommand DataExportCommand
        {
            get { return dataExportCommand; }
            set { dataExportCommand = value; }
        }


        public DataExportViewMode()
        {
            dataExportService = new DataExportService();
            DataExportCommand = new DelegateCommand(ExportData);
        }


        public void ExportData()
        {
        }

    }
}
